using System;
using UnityEngine;
public class SRigidUnionVEx:IVEx
{
public void SetData(ComponentData d){Debug.Assert(TargetType.IsAssignableFrom(d.ComponentType));_data=new WeakReference<ComponentData>(d);}
public SRigidUnionVEx(ComponentData d){SetData(d);}
public SRigidUnionVEx(){}
WeakReference<ComponentData> _data;
public UInt32 CompIdentity{get{if(_data.TryGetTarget(out ComponentData data))return data.CompIdentity;else throw new NullReferenceException("弱引用未找到");}}
public  Type TargetType=>typeof(SRigidUnion);
public ComponentData Data{get{if(_data.TryGetTarget(out ComponentData data))return data;
else throw new NullReferenceException("弱引用未找到");}}
public UnityEngine.Vector3 LocalPosition {get{if(_data.TryGetTarget(out ComponentData data))return data.GetValue<UnityEngine.Vector3>(0);else throw new NullReferenceException("弱引用未找到");}
set{if(_data.TryGetTarget(out ComponentData data))data.SetValue<UnityEngine.Vector3>(0,value,true);else throw new NullReferenceException("弱引用未找到");}}
public static ushort LocalPositionId{get=>(ushort)0;}
public System.Single LocalRotation {get{if(_data.TryGetTarget(out ComponentData data))return data.GetValue<System.Single>(1);else throw new NullReferenceException("弱引用未找到");}
set{if(_data.TryGetTarget(out ComponentData data))data.SetValue<System.Single>(1,value,true);else throw new NullReferenceException("弱引用未找到");}}
public static ushort LocalRotationId{get=>(ushort)1;}
public System.Boolean LocalIsFliped {get{if(_data.TryGetTarget(out ComponentData data))return data.GetValue<System.Boolean>(2);else throw new NullReferenceException("弱引用未找到");}
set{if(_data.TryGetTarget(out ComponentData data))data.SetValue<System.Boolean>(2,value,true);else throw new NullReferenceException("弱引用未找到");}}
public static ushort LocalIsFlipedId{get=>(ushort)2;}
public UnityEngine.Vector2 Velocity {get{if(_data.TryGetTarget(out ComponentData data))return data.GetValue<UnityEngine.Vector2>(3);else throw new NullReferenceException("弱引用未找到");}
set{if(_data.TryGetTarget(out ComponentData data))data.SetValue<UnityEngine.Vector2>(3,value,true);else throw new NullReferenceException("弱引用未找到");}}
public static ushort VelocityId{get=>(ushort)3;}
public System.Single AngleVelocity {get{if(_data.TryGetTarget(out ComponentData data))return data.GetValue<System.Single>(4);else throw new NullReferenceException("弱引用未找到");}
set{if(_data.TryGetTarget(out ComponentData data))data.SetValue<System.Single>(4,value,true);else throw new NullReferenceException("弱引用未找到");}}
public static ushort AngleVelocityId{get=>(ushort)4;}

}
